<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-08-17
    	描述：基地管理
    -->
	<div class="Announcements">
		<div class="Website-visits">
			<div class="location">
				<div class="location-text fl">
					<img class="location-img fl" src="../../images/BaseManager/guanli.png" />
					<p class="fr">基地管理</p>
				</div>
				<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
				<input @click="demand" type="button" class="btn fr" value="新增基地" />
			</div>
			<div class="search-box">
				<div class="fl">
					<label>基地分类</label>
					<select id="type" name="type" class="search">
            <option value="">请选择</option>
            <option value="0">现代农业综合示范基地</option>
            <option value="1">现代农业特色产业基地</option>
            <option value="2">乡村建设研究实践基地</option>
            <option value="3">新农村建设分布式服务站</option>
          </select>

				</div>
				<div class="fr right">
					<input class="search" id="searchRoleVal" type="text" autocomplete="off" />
					<input class="btn announcement-search" type="button" @click="searchBase" value="搜索" />
				</div>
			</div>
			<div class="PressRelease-list">
				<table>
					<thead>
						<tr>
							<th class="w200">基地名称</th>
							<th class="w200">基地类别</th>
							<th class="w80"> 基地信息 </th>
							<th class="w80">共建协议</th>
							<th class="w80">材料管理</th>
							<th class="w80">对接专家</th>
							<th class="w80">建设情况</th>
							<th class="w80">项目管理</th>
							<th class="w150">制牌信息</th>
							<th class="w80">操作</th>

						</tr>
					</thead>
					<tbody>
						<tr v-if="total==0">
							<td colspan="10" class="center">暂无数据！</td>
						</tr>
						<tr v-else v-for="(base,index) in baseData"  :class="index==curIndex?'activeBg':''" @click="choosed(index)">

							<td :title="base.name"> <span class="show-twoline">{{base.name}}</span></td>
							<td :title="base.type == 0?'现代农业综合示范基地':base.type == 1?
                '现代农业特色产业基地':base.type == 2?'乡村建设研究实践基地':base.type == 3?'新农村建设分布式服务站':'其他' ">

								{{base.type == 0?'现代农业综合示范基地':base.type == 1? '现代农业特色产业基地':base.type == 2?'乡村建设研究实践基地':base.type == 3?'新农村建设分布式服务站':'其他' }}</td>
							<td><input @click="toView(base.id)" type="button" value="查看" class="delete write" /></td>
							<td><input @click="build" type="button" value="查看" class="delete write" /></td>
							<td><input @click="Material(base.id)" type="button" value="查看" class="delete write" /></td>
							<td><input @click="Model(base.id)" type="button" value="查看" class="delete write" /></td>
							<td><input type="button" @click="AllTicketss(base.id)" value="查看" class="delete write" /></td>
							<td><input @click="projectThe(base.id)" type="button" value="查看" class="delete write" /></td>
							<td>
                <input type="file"  id="handIdFrontThe" accept="image/*"
                       @change="reservedTemidFrontImgs($event)" style="display: none;" />


                <input v-if=" base.reserved == null || base.reserved == ''  " @click="retouchOffIdInput(1, base.id)" type="button" value="上传"  class="delete write" />
                <input v-else type="button" value="预览" @click="toSrc(base.reserved)" class="delete write" />

                <input v-if=" base.reserved" @click="retouchOffIdInput(1, base.id)" type="button" value="修改"  class="delete write" />

              </td>
							<td v-if="base.status == 1"><input @click="baseTerminate(base.id)" type="button" value="基地终止" class="delete write" /></td>
							<td v-if="base.status == 6"><p>基地已终止</p></td>
							<td v-if="base.status == 2"><input @click="baseTerminate(base.id)" type="button" value="基地终止" class="delete write" /></td>

							<td v-if="base.status == 3"><p>基地已退出</p></td>

							<!--  <td v-if="base.status == 5"><input  type="button" value="基地退出不通过" class="delete " /></td>-->
							<td v-if="base.status == 5"><input @click="baseTerminate(base.id)" type="button" value="基地终止" class="delete write" /></td>

						</tr>
					</tbody>
				</table>
			
			</div>
				<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
				<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
		</div>

		<!-- 新增基地-模态框-->
		<div v-show="demandModelShow" class="tenant-model" id="addBaseDiv">
			<div class="tenant-model-content ApplicationStatus Status">
				<header class="tenant-model-header">
					<h3>新增基地</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body add-base-model">
					<div class="search-contain ">
						<!--模态框内容板块-->
						<form class="form-box" id="baseForm">
							<div class="form-line  input-required">
								<label class="label-three">基地名称：</label>
								<div class="input-box">
									<input type="text" name="name" autocomplete="off" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">基地类别：</label>
								<div class="input-box">
									<select name="type" id="selectType">
                    <option value="">请选择</option>
                    <option value="0">现代农业综合示范基地</option>
                    <option value="1">现代农业特色产业基地</option>
                    <option value="2">乡村建设研究实践基地</option>
                    <option value="3">新农村建设分布式服务站</option>
									</select>
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">基地地址：</label>
								<div class="input-box">
									<input type="text" name="address" autocomplete="off" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">申请单位：</label>
								<div class="input-box">
									<input type="text" name="unit" autocomplete="off" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">通讯地址：</label>
								<div class="input-box">
									<input type="text" name="correspondenceAddress" autocomplete="off" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">联系人：</label>
								<div class="input-box">
									<input type="text" name="contact" autocomplete="off" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-three">联系方式：</label>
								<div class="input-box">
									<input type="text" name="theContact" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-four">财务联系人：</label>
								<div class="input-box form-line-box finance-contact">
									<input type="text" name="financialContact" />
								</div>
							</div>
							<div class="form-line input-required">
								<label class="label-two">财务联系电话：</label>
								<div class="input-box form-line-box finance-telphone">
									<input type="text" name="contactNumber" />
								</div>
							</div>

							<div class="form-line ">
								<label class="label-two">申请模板下载：</label>
								<div class="input-box form-line-box">
									<a @click="getBaseTem">下载</a>
								</div>
							</div>

							<div class="form-line Website-right input-required">
								<label class="label-five">选择基地负责人：</label>
								<a @click="projectDetails">选择</a> &nbsp; <span v-if="userName">已选择: {{userName}}</span>
								<span v-if="!userId&&isClick" class="star">请选择基地负责人</span>
							</div>

							<div class="form-line Website-right ">
								<label>附件上传：</label>
								<input name="attachment" type="hidden" v-model="attachment" />
								<input type="file" id="handIdFront" accept=".doc,.docx,.xls,.xlsx,.pdf,.html,.txt,image/jpeg,image/tif,image/gif,image/png,image/bmp,.mp3,.mp4,.wav,.flv,.avi" @change="idFrontImg($event)" style="display: none;" />

								<a @click="touchOffIdInput(1)">上传附件</a>
								<a @click="delAtt()" v-if="attachment">删除附件</a>

								<!--      <a class="Public-btn1 uploadbtn handIdFrontA " @click="touchOffIdInput(1)">上传附件</a>
                <a class="Public-btn1 uploadbtn handIdFrontA " @click="delAtt()">删除附件</a>-->

								<ul class="img-box enclosure-list" v-if="attachment">
									<li v-for="item in FileUpload">{{item}}</li>
								</ul>
							</div>
							<div class="form-line Website-right input-required">
								<label class="label-three">基地简介：</label>
								<div class="input-box form-line-box finance-telphone">
									<textarea class="textarea " id="introduction" name="introduction"></textarea>
								</div>
							</div>

							<div class="search-boxs Website-right imgbox input-required">
								<label>基地展示图片：</label>
								<div class="imgbtn add-upload-enclosure">
									<input name="picture" type="hidden" v-model="picture" />
							
									<input type="file" id="handIdFronts" accept="image/*" @change="idFrontImgs($event)" style="display: none;" />
									<a class="Public-btn1 uploadbtn handIdFrontA " @click="touchOffIdInputs(1)" v-if="!pictureImg">上传图片</a> 
									<a class="Public-btn1 uploadbtn handIdFrontA " @click="touchOffIdInputs(1)" v-if="pictureImg">重新上传图片</a> 

									<img class="showHandIdFront" id="pictureImg" />
									<!--  <ul class="img-box">
                    <li v-for="item in FileUploads">{{item}}</li>
                  </ul>-->
								</div>
								<span v-if="!pictureImg&&isClick" class="star">请选择基地展示图片</span>
							</div>

						</form>
					</div>
				</div>
				<footer class="tenant-model-footer">
					<button class="determine" @click="subForm">确认</button>
				</footer>
			</div>
		</div>
		<!-- 选择负责人-模态框-->
		<div v-if="ProjectModelShow" class="tenant-model">
			<div class="tenant-model-content demandModel">
				<header class="tenant-model-header">
					<h3>选择基地负责人</h3>
					<span @click="closeBaseT" id="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<div class="fl search-box">
							<input class="search" id="Searchname" type="text" />
							<input class="btn" @click="SearcUser" type="button" value="搜索" />
						</div>
						<table>
							<tr>
								<th v-if="utotal"></th>
								<th>姓名</th>
								<th>身份证号码</th>
								<th>当前是否为基地负责人</th>
							</tr>
			                <tr v-if="utotal == 0">
			                	<td colspan="3" class="center">暂无数据！</td>
			                </tr>
							<tr v-for="u in user">
								<td><label><input type="radio" :checked="checkedUser.userId === u.id" @click="checkUserId(u.id, u.user_name)" name="baseRadio" ><i>✓</i></label></td>
								<td>{{u.user_name}}</td>
								<td>{{u.user_account}}</td>
								<td>{{u.count == 0?'否':'是'}}</td>
							</tr>

						</table>
						<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
						<pageination :total="utotal" :size="usize" :page="upage" :changge="upageFn" @child="obtainChild1"></pageination>
					</div>
				</div>
				<footer class="tenant-model-footer">
					<button class="determine" @click="checkedBaseT">确定</button>
				</footer>
			</div>
		</div>
		<!--查看-模态框-->
		<div v-if="Application" class="tenant-model">
			<div class="tenant-model-content ApplicationStatus">
				<header class="tenant-model-header">
					<h3>查看基地信息</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--模态框内容板块-->
						<form class="form-box">
							<div class="form-line ">
								<label class="label-three">基地名称：</label>
								<div class="input-box">
									{{base.name}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">基地类别：</label>
								<div class="input-box">
									{{base.type}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">基地地址：</label>
								<div class="input-box">
									{{base.address}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">申请单位：</label>
								<div class="input-box">
									{{base.unit}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">通讯地址：</label>
								<div class="input-box">
									{{base.correspondenceAddress}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">联系人：</label>
								<div class="input-box">
									{{base.contact}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">联系方式：</label>
								<div class="input-box">
									{{base.theContact}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-four">财务联系人：</label>
								<div class="input-box">
									{{base.financialContact}}
								</div>
							</div>
							<div class="form-line Website-right">
								<label class="label-two">财务联系电话：</label>
								<div class="input-box">
									{{base.contactNumber}}
								</div>
							</div>
							<div class="form-line Website-right " >
								<label class="label-one">附件：</label>
								<div class="input-box">
									<a @click="toSrc(base.attachment)">预览</a>
								</div>
							</div>
							<div class="form-line Website-right">
								<label class="label-three">基地简介：</label>
								<div class="input-box Website-right-textarea">
									{{base.introduction}}
								</div>
							</div>
							<div class="search-boxs imgbox Website-right">
								<label class="label-three">基地图片：</label>
								<div class="imgbtn">
									<img :src="thatUrl+ base.picture" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!--共建协议 -模态框-->
		<div v-if="buildAgreement" class="tenant-model">
			<div class="tenant-model-content buildAgreement construction-agreement">
				<header class="tenant-model-header">
					<h3>共建协议</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<div class="Build-agreement">
							<p class="agreement-text">共建实践教学基地协议书</p>
							<div class="agreement-nav">
								<p>甲方：西南大学 </p>
								<p>乙方：<input class="input" type="text" /> </p>
								<p class="agreement">本着互惠共赢原则，经友好协商，甲乙双方就共建实践教学基地事宜达成如下协议：</p>
								<p>一、甲方的责任与义务</p>
								<p class="agreement">1.提前向乙方提供实践计划（含学生人数、专业、实践时间、实践内容等）；</p>
								<p class="agreement">2.选派指导教师负责实践学生的实践指导、安全管理、生活安排及其它相关工作，监督学生遵守乙方有关规章制度；</p>
								<p class="agreement">3.为乙方在科研攻关、人才培养等方面提供支持，适时向乙方推荐优秀毕业生。</p>
								<p>二、乙方的责任与义务</p>
								<p class="agreement">1.协同甲方统筹安排实践方案，为甲方学生提供实践场所、设施和生活方便；</p>
								<p class="agreement">2.选派专人（有经验的专业技术人员、管理人员）指导学生实践并参与学生实践评价；协助甲方加强实践学生的学习生活管理；</p>
								<p class="agreement">3.及时向甲方反馈学生实践情况。</p>
								<p>三、其它未尽事宜，由双方协商解决。</p>
								<p class="agreement">本协议有效期 <input class="input" type="text" />年，自签订之日起开始生效。</p>
								<p class="agreement">本协议壹式叁份，福建师范大学教务处、实践教学基地、相关学院各执一份。</p>
								<p class="agreement-write"><span>甲方代表：<input class="input" type="text" /></span><span class="fr">乙方代表：<input class="input" type="text" /></span></p>
								<p class="agreement-write"><span><input class="inputs" type="text" />年<input class="inputs" type="text" />月<input class="inputs" type="text" />日</span><span class="fr"><input class="inputs" type="text" />年<input class="inputs" type="text" />月<input class="inputs" type="text" />日</span></p>
							</div>
						</div>
					</div>
				</div>
				<!--<footer class="tenant-model-footer">
					<button class="determine">确定</button>
				</footer>-->
			</div>
		</div>

		<!-- 对接专家团队-模态框-->
		<div v-if="ModelShow" class="tenant-model">
			<div class="tenant-model-content ">
				<header class="tenant-model-header">
					<h3>查看对接专家</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox look-expert">
						<!--模态框内容板块-->
						<table>
							<tr>
                				<th class="w300">项目名称</th>
								<th class="w200">专家姓名</th>
								<th class="w200">身份证号码</th>
								<th class="w80">工作合同</th>
								<th class="w80">工作记录</th>
							</tr>
							<tr v-if="expertsTotal==0">
								<td colspan="5">暂无数据</td>
							</tr>
							<tr v-for="mo in experts">
                				<td :title="mo.name"><span class="show-oneline-table">{{mo.name}}</span></td>
								<td>{{mo.expert_name}}</td>
								<td>{{mo.the_work}}</td>
								<td>
               						<button v-if="mo.guide" @click="viewHeModel( mo)" class="delete write" >查看</button>
								</td>

								<td>
									<button @click="viewLog(mo.id)" class="delete write" >查看</button>
								</td>
							</tr>
						</table>
						<pageination :total="expertsTotal" :size="size" :page="expertsPage" :changge="pageFnExperts" @child="obtainChildExperts"></pageination>

					</div>
				</div>
				<!--	<footer class="tenant-model-footer">
					<button class="determine">确定</button>
				</footer>-->
			</div>
		</div>

    <!-- 合同信息-查看模态框-->
    <div v-if="modelShowView" class="tenant-model">
      <div class="tenant-model-content modelShow">
        <header class="tenant-model-header">
          <h3>查看工作合同</h3>
          <span @click="closeHeModel" class="closeModel">×</span>
        </header>
        <div class="tenant-model-body">
          <div class="search-contain">
            <!--模态框内容板块-->
            <form class="form-box" >
              <div class="after time-style after">
                <div class="form-line fl">
                  <label>开始时间：</label>
                  <span>{{obj.contract_begin_time}}</span>
                </div>
                <div class="form-line fr">
                  <label>结束时间：</label>
                  <span>{{obj.contract_end_time}}</span>
                </div>
              </div>

              <div class="form-line ">
                <label>指导次数：</label>
                <span>{{obj.guide}} 次</span>
              </div>
              <div class="form-line">
                <label>附件：</label>
                <a  class="delete write" @click="toSrc(obj.contract)">预览</a>

              </div>

            </form>
          </div>
        </div>

      </div>
    </div>

		<!-- 对接专家团队日志-模态框-->
		<div v-if="ModelLog" class="tenant-model">
			<div class="tenant-model-content ">
				<header class="tenant-model-header">
					<h3>查看工作记录</h3>
					<span @click="closeWorkModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<table>
							<tr>
				                <th class="w150">时间</th>
				                <th class="w200">事由</th>
				                <th class="w200">地点</th>
				                <th class="w80">附件</th>
							</tr>
				            <tr v-if="logTotal == 0">
				                <td colspan="4" class="center">暂无数据！</td>
				            </tr>
              
							<tr v-for="l in logData">
								<td>{{formatData(l.beginTime)}}</td>
								<td :title="l.content">
									<span class="show-oneline-table">{{l.content}}</span>
								</td>
								<td :title="l.position">
									<span class="show-oneline-table">{{l.position}}</span>
								</td>
								<td>
									<button @click="toSrcThe(l.picture)" class="delete write">预览</button>
								</td>
							</tr>
						</table>
						<pageination :total="logTotal" :size="size" :page="logPage" :changge="pageFnExpertsLog" @child="obtainChildExpertsLog"></pageination>

					</div>
				</div>
				<!--	<footer class="tenant-model-footer">
                      <button class="determine">确定</button>
                  </footer>-->
			</div>
		</div>

		<!-- 基地建设-模态框-->
		<div v-if="ModelConstruction" class="tenant-model">
			<div class="tenant-model-content ">
				<header class="tenant-model-header">
					<h3>查看基地建设</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<table>
							<tr>
								<th>开始时间</th>
								<th>结束时间</th>
								<th>建设事项</th>
								<th>附件</th>
							</tr>
              <tr v-if="constTotal == 0">
                <td colspan="4" class="center">暂无数据！</td>
              </tr>
							<tr v-for="mo in construction">
								<td>{{formatData(mo.startTime)}}</td>
								<td>{{formatData(mo.endTime)}}</td>
								<td :title="mo.constructionMatters">{{subStrThe(mo.constructionMatters) }}</td>
								<td><input type=" button" @click="toSrc( mo.attachment)" class="delete" value="预览" /></td>
							</tr>
						</table>
						<pageination :total="constTotal" :size="10" :page="constPage" :changge="pageFnConst" @child="obtainChildConst"></pageination>

					</div>
				</div>
				<!-- <footer class="tenant-model-footer">
          <button class="determine">确定</button>
        </footer>-->
			</div>
		</div>

		<!-- 基地材料管理-模态框-->
		<div v-if="material" class="tenant-model">
			<div class="tenant-model-content  ">
				<header class="tenant-model-header">
					<h3>查看材料管理</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<div class="tab-tit">
							<a href="javascript:;" @click="curId=0" :class="{'cur':curId===0}">验收材料</a>
							<a href="javascript:;" @click="curId=1" :class="{'cur':curId===1}">评审材料</a>
						</div>
						<div class="tab-con">
							<div v-show="curId===0">
								<table>
									<tr>
										<th class="width450">材料名称</th>
										<!--<th>材料下载</th>-->
										<th>附件</th>
									</tr>
                  <tr v-if="attTotal == 0">
                    <td colspan="4" class="center">暂无数据！</td>
                  </tr>
									<tr v-else v-for="a in attData">
										<td :title="a.name"><span class="show-oneline-table">{{a.name}}</span></td>
										<td>
											<!--							<input type="button" @click="downloadResources(a.attachment)" value="下载" class="delete write" />-->
											<input type="button" @click="toSrc( a.attachment)" value="预览" class="delete write" />
										</td>
									</tr>
								</table>
								<pageination :total="attTotal" :size="size" :page="attPage" :changge="pageFnAtt" @child="obtainChildAtt"></pageination>
							</div>
							<div v-show="curId===1">
								<table>
									<tr>
										<th class="width450">材料名称</th>
										<!--	<th>材料下载</th>-->
										<th>附件</th>
									</tr>
                  <tr v-if="attTotal2 == 0">
                    <td colspan="4" class="center">暂无数据！</td>
                  </tr>
									<tr v-else v-for="a in tableDatap">
										<td :title="a.name"><span class="show-oneline-table">{{a.name}}</span></td>
										<td>
											<!--	<input type="button" @click="downloadResources(a.attachment)" value="下载" class="delete write" />-->
											<input type="button" @click="toSrc( a.attachment)" value="预览" class="delete write" />
										</td>
									</tr>
								</table>
								<pageination :total="attTotal2" :size="size" :page="attPage2" :changge="pageFnAtt2" @child="obtainChildAtt2"></pageination>
							</div>
						</div>

					</div>
				</div>
				<!--	<footer class="tenant-model-footer">
					<button class="determine">确定</button>
				</footer>-->
			</div>
		</div>
		<!-- 基地项目管理-模态框-->
		<div v-if="projectManagement" class="tenant-model">
			<div class="tenant-model-content  projectManagement">
				<header class="tenant-model-header">
					<h3>查看项目管理</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<table>
							<tr>
								<th>项目名称</th>
								<th>发布人</th>
								<th>提出时间</th>
								<th>项目类型</th>
								<!--	<th>状态</th>-->
								<th>操作</th>
							</tr>
              <tr v-if="projectTotal == 0">
                <td colspan="5" class="center">暂无数据！</td>
              </tr>
							<tr v-for=" p in projectData">
								<td :title="p.name">{{subStrThe(p.name)}}</td>

								<td>{{p.createBy}}</td>
								<td>{{formatData(p.createAt)}}</td>
								<td>{{p.type == 0?'研究院项目':'横向项目'}}</td>
								<!--							<td>{{p.processStatus == 0?'项目筛选': p.processStatus ==1?'项目立项': p.processStatus == 2?'中期': p.processStatus==3?'结题':''  }}</td>-->
								<td>
									<button @click="management(p)"  class="delete write">查看</button>
									
								</td>
							</tr>

						</table>
						<pageination :total="projectTotal" :size="size" :page="projectPage" :changge="pageFnProject" @child="obtainChildProject"></pageination>
					</div>
				</div>
				<!--<footer class="tenant-model-footer">
					<button class="determine">确定</button>
				</footer>-->
			</div>
		</div>

		<!-- 基地项目详情-模态框-->
		<div v-if="demandModel" class="tenant-model">
			<div class="tenant-model-content demand">
				<header class="tenant-model-header">
					<h3>基地项目管理</h3>
					<span @click="closeDemandModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--模态框内容板块-->
						<div class="tab-tit">
							<!--<a href="javascript:;" @click="curId=0" :class="{'cur':curId===0}">项目需求</a>-->
							<a href="javascript:;" @click="curId=1" :class="{'cur':curId===1}">项目立项</a>
							<a href="javascript:;" @click="curId=2" :class="{'cur':curId===2}">项目中期</a>
							<a href="javascript:;" @click="curId=3" :class="{'cur':curId===3}">项目结题</a>
						</div>
						<div class="tab-con">
		<!--					<div v-show="curId===0">
								<div class="rork">
									<p>项目名称：<span class="project-name">{{projectObj.name}}</span></p>
									<p>项目类型：{{projectObj.type == 0?'研究院项目':'横向项目'}} </p>
									<p>项目简介：<span class="project-name">{{projectObj.introduction}}</span></p>
									<p>项目需求说明书：<a class="attachment" @click="toSrc(projectObj.demandBookUrl)">预览</a></p>
								</div>
							</div>-->
							<div v-show="curId===1">
								<p class="rork-text">专家任务书</p>
								<div class="rork">
									<p>项目名称：<span class="project-name">{{projectObj.name}}</span></p>
									<p>起时间：{{formatData(projectObj.contractBeginTime)}}</p>
									<p>止时间：{{formatData(projectObj.contractEndTime)}}</p>
									<p>项目负责人：{{projectObj.createUserName}}</p>
									<p>身份证号码：{{projectObj.userAccount}}</p>
									<p v-if="projectObj.initiationAuditStatus == 2">项目总金额：{{projectObj.budgetAmount}}</p>
									<p v-if="projectObj.initiationAuditStatus == 2">任务书附件： <input type="button" @click="toSrc(projectObj.taskBookUrl)" value="预览" class="delete write" /></p>



						<!--			<p>项目合同附件：<span @click="toSrc(projectObj.contract)" class="attachment">预览</span></p>-->
								</div>
							</div>
							<div v-show="curId===2">
								<p class="rork-text">中期进度报告</p>
								<div class="rork">
									<p>项目名称：<span class="project-name">{{projectObj.name}}</span></p>
									<p>起时间：{{formatData(projectObj.contractBeginTime)}}</p>
									<p>止时间：{{formatData(projectObj.contractEndTime)}}</p>
									<p>项目负责人：{{projectObj.createUserName}}</p>
									<p>身份证号码：{{projectObj.userAccount}}</p>
                  <p v-if="projectObj.initiationAuditStatus == 2">项目总金额：{{projectObj.budgetAmount}}</p>
									<p v-if="projectObj.metaphaseAuditStatus == 2">经费使用金额：{{projectObj.practicalAmount}}</p>
									<p v-if="projectObj.metaphaseAuditStatus == 2"> 中期报告附件：<a @click="toSrc(projectObj.metaphaseReportUrl)" class="attachment">预览</a></p>

								</div>
							</div>
							<div v-show="curId===3">
								<p class="rork-text">结题报告</p>
								<div class="rork">
									<p>项目名称：<span class="project-name">{{projectObj.name}}</span></p>
									<p>起时间：{{formatData(projectObj.contractBeginTime)}}</p>
									<p>止时间：{{formatData(projectObj.contractEndTime)}}</p>
									<p>项目负责人：{{projectObj.createUserName}}</p>
									<p>身份证号码：{{projectObj.userAccount}}</p>
                  <p v-if="projectObj.initiationAuditStatus == 2">项目总金额：{{projectObj.budgetAmount}}</p>
									<p v-if="projectObj.closureAuditStatus == 2">经费使用金额：{{projectObj.closurePracticalAmount}}</p>
									<p v-if="projectObj.closureAuditStatus == 2">结题报告附件：<a @click="toSrc(projectObj.closureMaterialUrl)" class="attachment">预览</a></p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 基地终止-模态框-->
		<div v-if="BaseTerminate" class="tenant-model">
			<div class="tenant-model-content BaseTerminate">
				<header class="tenant-model-header">
					<h3>基地终止原因</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain ">
						<!--模态框内容板块-->
						<!--<form class="form-box">-->
							<div class="form-line Website-right-content input-required">
								<label class="label-three"><span class="star">*</span>内容：</label>
								<textarea class="textarea" id="terminationContent"></textarea>
							</div>
							<input type="hidden" v-model="termination"></input>
							<div class="form-line Website-right">
								<label class="label-one">附件：</label>
								<input type="file" id="temHandIdFronts" accept=".doc,.docx,.xls,.xlsx,.pdf,.html,.txt,image/jpeg,image/tif,image/gif,image/png,image/bmp,.mp3,.mp4,.wav,.flv,.avi" @change="temidFrontImgs($event)" style="display: none;" />
								<input class="delete center" @click="temtouchOffIdInputs(1)" type="button" value="上传附件" />
								<input class="delete center" @click="deletetouchOffIdInputs()" type="button" value="删除附件"  v-if="termination"/>
								<ul class="img-box enclosure-termination" v-if="termination">
									<li v-for="item in temFileUploads">{{item}}</li>
								</ul>

							</div>
							
						<!--</form>-->
					</div>
				</div>
				<footer class="tenant-model-footer">
					<button class="determine" @click="subBaseTerminate">确认</button>
				</footer>
			</div>
		</div>
	</div>
</template>
<script src="./BaseManagementManager.js"></script>

<style scoped>
	@import "BaseManagementManager.css";
</style>
